﻿from django.contrib import admin
from geography.models import  L0Object, L1Object, L2Object, L34Object

class L0ObjectAdmin(admin.ModelAdmin):
    
    
    list_display = ('name', 'abbr', )
    search_fields = ('name', )

class L1ObjectAdmin(admin.ModelAdmin):
    
    
    list_display = ('name', 'abbr', )
    search_fields = ('name', )
    list_filter = ('parent', )

class L2ObjectAdmin(admin.ModelAdmin):
    
    
    list_display = ('name', 'abbr',)
    search_fields = ('name', )
    list_filter = ('parent', )
    
class L34ObjectAdmin(admin.ModelAdmin):
    
    
    list_display = ('name', 'abbr',)
    search_fields = ('name', )
    list_filter = ('l1_parent', 'l2_parent', )
    
admin.site.register(L0Object, L0ObjectAdmin)
admin.site.register(L1Object, L1ObjectAdmin)
admin.site.register(L2Object, L2ObjectAdmin)
admin.site.register(L34Object, L34ObjectAdmin)